<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateTypeTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $connection = config('admin.database.connection') ?: config('database.default');

        Schema::connection($connection)->create(config('admin.database.type'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 20);
            $table->timestamps();
        });
        Schema::connection($connection)->create(config('admin.database.content'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer("name");
            $table->string('content', 200);
            $table->timestamps();
        });
    }

}
